module.exports = app =>{
    const {router, controller} = app
    //路由守卫
    var adminauth = app.middleware.adminauth()
    router.get('/admin/index', controller.admin.main.index)
    router.post('/admin/checkLogin', controller.admin.main.checkLogin)
    router.get('/admin/getTypeInfo',adminauth,controller.admin.main.getTypeInfo)
    router.post('/admin/addArticle',adminauth,controller.admin.main.addArticle)
    router.post('/admin/updateArticle',adminauth,controller.admin.main.updateArticle)
    router.get('/admin/getArticleList',adminauth,controller.admin.main.getArticleList)
    router.get('/admin/getLeaveMessageList',adminauth,controller.admin.main.getLeaveMessageList)
    router.get('/admin/deleteLeaveMessage/:id',adminauth,controller.admin.main.deleteLeaveMessage)
    router.get('/admin/updateLeaveMessageWhether/:id',adminauth,controller.admin.main.updateLeaveMessageWhether)
    router.get('/admin/deleteArticle/:id',adminauth,controller.admin.main.deleteArticle)
    router.get('/admin/getArticleById/:id',adminauth,controller.admin.main.getArticleById)


}